package com.ph.irp.login.service.impl;

import com.ph.irp.base.usermanage.dao.PBasePurviewUserDAO;
import com.ph.irp.login.service.LoginService;
import com.ph.irp.model.PBasePurviewUser;

public class LoginServiceImpl implements LoginService {
	PBasePurviewUserDAO userDaoProxy;

	public void setUserDaoProxy(PBasePurviewUserDAO userDaoProxy) {
		this.userDaoProxy = userDaoProxy;
	}

	public boolean isExistedUser(String name, String password) throws Throwable {

		return userDaoProxy.isExistedUser(name, password);

	}

	public boolean isExistedUser(String name) throws Throwable {

		return userDaoProxy.isExistedUser(name);

	}

	public PBasePurviewUser getUserByUserNameAndPassword(String name,
			String password) throws Throwable {

		PBasePurviewUser pb = userDaoProxy.getUserByUserNameAndPassword(name,
				password);
		return pb;

	}
}
